<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>学生满意度调查</title>

	<link type="text/css" rel="stylesheet" th:href="@{/css/all.css}"/>
	<script language='javascript' th:src='@{/js/echarts.js}'></script>
	<script language='JavaScript' th:src='@{/plugin/jQuery/jQuery-2.2.0.min.js}'></script>
	<script language='javascript' th:src='@{/js/constant.js}'></script>
	<script language='JavaScript' th:src='@{/plugin/bootstrap/js/bootstrap.min.js}'></script>
	<script language='JavaScript' th:src='@{/plugin/bootstrap-table/bootstrap-table.js}'></script>
	<script language='JavaScript' th:src='@{/plugin/adminLTE/js/app.min.js}'></script>
	<script language='JavaScript' th:src='@{/plugin/lobibox/dist/js/lobibox.js}'></script>
	<script language='JavaScript' th:src='@{/js/network.js}'></script>
	<script language='JavaScript' th:src='@{/js/common.js}'></script>
	<script language='JavaScript' th:src='@{/js/public.js}'></script>
	<script language='JavaScript' th:src='@{/plugin/iCheck/icheck.min.js}'></script>
<style type="text/css">
.icon-storage>i {
	cursor: pointer;
}
</style>
</head>
<body class="body-contrainner fadeInUp">
	<div class="nav-tabs-custom tab-info no-margin">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:void(0);">完成情况</a></li>
<!-- 			<li><a href="<%=basePath %>analysis/stuManage/book">图书信息</a></li>
 			<li class="pull-right  header"></li>-->
		</ul>
		<div class="tab-content">
		
			<div class="row">
				<div class="col-md-8 column">
					<div class="box box-primary">
			            <div class="box-header">
				            <h3 id="tabTittle2"class="box-title">各学院学生满意度调查完成情况</h3>
			            </div>
			            <div id="body1" class="box-body">
				            <div class="chart">
				                <div id="chart" style="height:300px"></div>
				            </div>
			            </div>
					</div>
				</div>
				<div class="col-md-4 column">
					<div class="box box-primary">
			            <div class="box-header">
				            <h3 id="tabTittle3"class="box-title">学院总参评率对比</h3>
			            </div>
			            <div id="body2" class="box-body">
				            <div class="chart">
				                <div id="chartxyzcpl" style="height:300px"></div>
				            </div>
			            </div>
					</div>
				</div>
				
			</div>	
		
		
<!--		<div class="row">
				<div class="box-header">
					<form id="form-search" class="form-inline has-info"
						style="margin-left: 15px">
						<div class="form-group">
							<label class="control-label">学号</label> <input type="text" id ='xh' name="xh" class="form-control" placeholder="请输入学号">
						</div>
						<div class="form-group">
							<label class="control-label">学院</label> 
							&lt;!&ndash; <input type="text" id= 'ssxb' name="ssxb" class="form-control" placeholder="请输入学院"> &ndash;&gt;
							<select id= "ssxb" name="ssxb" class="form-control">
							<option value="" selected="selected">&#45;&#45;请选择&#45;&#45;</option>
							<c:forEach items="${xymc}" var="xymcName">												
                                    <option value="${xymcName}" >${xymcName}</option>
							</c:forEach>
							</select>
						</div>
						<div class="form-group">
							<label class="control-label">完成情况</label> 
							<select id= 'status' name="status" class="form-control">
							<option value="" selected="selected">&#45;&#45;请选择&#45;&#45;</option>
							<option value="1">未完成</option>
							<option value="0">已完成</option>
							</select>
							
							
					</div>
						<div class="form-group">
							<button id="btn-search" type="button" class="btn btn-info">
								<i class="fa fa-search margin-r-5"></i>查询
							</button>
							<button id="btn-export" type="button" class="btn btn-default">
								<i class="fa fa-download margin-r-5"></i>导出
							</button>
						</div>
					</form>
				</div>

				<div class="box-body" style="padding-top: 0px;">
					<table id="data-table" class="table table-bordered"
						data-striped="true" data-pagination="true"
						data-search-on-enter-key="true" data-id-field="id"
						data-unique-id="id" data-click-to-select="true"
						data-side-Pagination="server" data-cache="false" data-method="get"
						data-query-params="getParam" >
						<thead>
							<tr>
							    <th data-field="state" data-radio="true"></th>
							    <th data-field="rowNum" data-align="left" data-halign="left" data-valign="middle" data-formatter=bootstrapFormatter.rowNumFormatter>序号</th>
								<th data-field="XH" data-align="left" data-halign="center"data-valign="middle" data-sortable="true">学号</th>
								<th data-field="XM" data-align="left" data-halign="center"data-valign="middle" data-sortable="true">姓名</th>
								<th data-field="XB" data-align="left" data-halign="center"data-valign="middle" data-sortable="true">性别</th>
								<th data-field="NJ" data-align="left" data-halign="center"data-valign="middle" data-sortable="true">年级</th>
								<th data-field="SSXB" data-align="left" data-halign="center"data-valign="middle" data-sortable="true">学院名称</th>
								<th data-field="BJMC" data-align="left" data-halign="center"data-valign="middle" data-sortable="true">班级名称</th>
								<th data-field="STATUS" data-align="left" data-halign="center"data-valign="middle" data-sortable="true" data-formatter="operateFormatter">完成情况</th>
							</tr>
						</thead>
					</table>
				</div>
			</div>
		-->


			
			
			
		</div>
	</div>

	<script language="JavaScript">
	
/*
		function getParam(params) {
			return commonTools.getBootstrapParams(params, $("#form-search"));
		}
	
		 function getTable(){
				var func_link = "/xsfk/mydwc";
				var xh = $("#xh").val();
				var ssxb = $("#ssxb").val();
				var status1 = $("#status").val();
				var params = "func_link="+func_link +  "&xh=" + xh +"&cnd_ssxb=" + ssxb +"&cnd_status=" + status1;
				$("#data-table").bootstrapTable({url: publicData.urls.analysis.cfg.getOneTableByUrl + "?" + encodeURI(params)});
			}
	        getTable();


		$("#btn-search").click(function() {
			var func_link = "/xsfk/mydwc";
			var xh = $("#xh").val();
			var ssxb = $("#ssxb").val();
			var status1 = $("#status").val();
			var params = "func_link="+func_link +  "&xh=" + xh +"&cnd_ssxb=" + ssxb +"&cnd_status=" + status1;
			$("#data-table").bootstrapTable("refresh", {pageNumber:1, url:publicData.urls.analysis.cfg.getOneTableByUrl+"?"+encodeURI(params)});
		});

        var operateFormatter = function(value,row,index) {//赋予的参数
	     	if (value=="1") {
	    		return [
	    				'<span style="text-align: center;display:block;"><label class="label label-danger label-block" style="cursor:pointer">未完成</label></span>', ]
	    				.join('');
			}else if(value=="0") {
				return [
	    				'<span style="text-align: center;display:block;"><label class="label label-success label-block" style="cursor:pointer">已完成</label></span>', ]
	    				.join('');
			}
      }
        */
        getChart("chart", "/xsfk/mydwcz", "");
        getChart("chartxyzcpl", "/xsfk/xyzcpl", "");

  		function getChart(c, u, t) {
			var myChart = echarts.init(document.getElementById(c));
			var func_link = u;
			var params = {func_link: func_link};
			ajax.getData(publicData.urls.cfg.getChartsByUrl, params, function (data) {
				if(data != null && data != "" && data != "null") {
					var optData = data[0];
					var json = JSON.parse(optData);
					var jsonObj = eval('(' + json + ')');
					if(typeof jsonObj === "object") {
						myChart.setOption(jsonObj);
					} else {
						myChart.setOption(null);
					}
				}
			});
		}     
        
        
/*        $("#btn-export").click(function () {
        	var ssxb=$("#ssxb").val();
        	var status=$("#status").val();
        	var xh=$("#xh").val();
		    window.location.href = publicData.urls.analysis.myd.export1+"?xh="+xh+"&status="+status+"&ssxb="+ssxb;
		 }); */

	</script>
</body>
</html>